<?php
$options = array(
    'Visite' => 'Visite',
    'Promenade' => 'Promenade',
    'Garde chez vous' => 'Garde chez vous',
    'Garde chez le gardien' => 'Garde chez le gardien'
);
$options_known = array(
    'Google' => 'Google',
    'Le boncoin' => 'Le boncoin',
    'Les pages jaunes' => 'Les pages jaunes',
    'Facebook' => 'Facebook',
    'Twitter' => 'Twitter',
    'Presse' => 'Presse',
    'Autres' => 'Autres'
);
$select_region_setting = array(
    'table_name' => 'animus_sub_region',
    'key_field' => 'id',
    'value_field' => 'name',
);
for ($i = 0; $i < 7; $i++) {
    $day_data[$i + 1] = $i + 1;
}
for ($i = 0; $i < 24; $i++) {
    $hour_data[$i + 1] = $i + 1;
}

$options_animaux = array(
    '1' => '1',
    '2' => '2',
    '+3' => '+3'
);
?>
<div id="wrapper-content" >
  <div class="titre_home" >CONTACT</div>
    <?php if ($this->session->userdata('user_id') == TRUE) {
    ?>
    
    <?php echo form_open('seatting_falin/contact'); ?>
        <div align="left" class="wrapper_booking">
     <?php if(validation_errors()!="") {?><div class="error_form"><?php echo validation_errors(); ?></div><?php } ?>
     <br/>
            <div class="booking_form">
                <label>Quelles prestations ?</label>
                 <div><?php echo form_dropdown('title', $options) ?></div>
            </div>
            <div class="booking_form">
               <label>Ville:</label>
              <div><?php echo form_dropdown('city', dropdown_data($select_region_setting)) ?></div>
            </div>
          
            <div class="booking_form">
              <label>Quel animal ?</label>
                <div>
                <?php
                $chien = array(
                    'name' => 'animal',
                    'id' => 'rad_chien',
                    'value' => 'Chien',
                    'checked' => TRUE,
                    'style' => 'margin:10px',
                );
                $chat = array(
                    'name' => 'animal',
                    'id' => 'rad_chat',
                    'value' => 'Chat',
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                echo form_radio($chien) . 'Chien';
                echo form_radio($chat) . 'Chat'; ?>
            </div>
            </div>
           
        <div class="booking_form">
           <label>Combien d'animaux ?</label>
           <div><?php echo form_dropdown('total_animal', $options_animaux, 1); ?></div>
        </div>
         <div class="booking_form">
           <label>Date souhaité:</label>
            <div><input type="text" name="date_start" class="datepicker" size="30" value=""/></div>
        </div>
        <div class="booking_form">
          <label>Jours total:</label>
            <div><?php echo form_dropdown('total_date', $day_data, 1, 'id="total_date"'); ?></div>
        </div>
       <div class="booking_form">
            <label>A partir de quel heure ?</label>
              <div><?php echo form_dropdown('hour_start', $hour_data, 1, 'id="hour_start"'); ?></div>
        </div>
            <div class="booking_form">
          <label>Pendant combien d'heures ?</label>
           <div><?php echo form_dropdown('total_hour', $hour_data, 1, 'id="total_hour"'); ?></div>
        </div>
         <div class="booking_form">
        <label>Votre/vos animaux présentent t-ils des caractéristiques particulières au niveau de son/leurs comportements ?</label>
        <div><textarea name="content" id="content" type="text" rows="10" cols="40"></textarea></div>
         </div>
       
        <div class="booking_form">
           <label>Faudra t-il que le gardien lui administre des médicaments durant la mission ?</label>
         <div>
                <?php
                $qui_medi = array(
                    'name' => 'medicaments',
                    'id' => 'rad_medicaments_qui',
                    'value' => '1',
                    'checked' => TRUE,
                    'style' => 'margin:10px',
                );
                $non_medi = array(
                    'name' => 'medicaments',
                    'id' => 'rad_medicaments_non',
                    'value' => '0',
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                echo form_radio($qui_medi) . 'Qui';
                echo form_radio($non_medi) . 'Non'; ?>
            </div>
        </div>
       
        <div class="booking_form">
           <label>Avez-vous des demandes particulières pour l'habitat du gardien ?</label>
        <div>
                <?php
                $jardin = array(
                    'name' => 'habitat[]',
                    'id' => 'chk_habitat_jardin',
                    'value' => 'Jardin',
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                $m = array(
                    'name' => 'habitat[]',
                    'id' => 'chk_habitat_50m',
                    'value' => '+ 50m²',
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                $chats = array(
                    'name' => 'habitat[]',
                    'id' => 'chk_habitat_chats ',
                    'value' => 'Pas de chats',
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                $chiens = array(
                    'name' => 'habitat[]',
                    'value' => 'Pas de chiens',
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                $enfants = array(
                    'name' => 'habitat[]',
                    'value' => "Pas d'enfants",
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                $domicile = array(
                    'name' => 'habitat[]',
                    'value' => '50 km de votre domicile',
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                $fourniture = array(
                    'name' => 'habitat[]',
                    'id' => 'chk_habitat_fourniture',
                    'value' => 'Fourniture alimentation',
                    'checked' => FALSE,
                    'style' => 'margin:10px',
                );
                echo form_checkbox($jardin) . 'Jardin'; ?><br/>
                <?php echo form_checkbox($m) . '+ 50m²'; ?><br/>
                <?php echo form_checkbox($chats) . 'Pas de chats '; ?><br/>
                <?php echo form_checkbox($chiens) . 'Pas de chiens '; ?><br/>
                <?php echo form_checkbox($enfants) . "Pas d'enfants"; ?><br/>
                <?php echo form_checkbox($domicile) . '- 50 km de votre domicile '; ?><br/>
                <?php echo form_checkbox($fourniture) . 'Fourniture alimentation '; ?>
                ?>
            </div>
        </div>
       
              
        <div class="booking_form">
        <label>Comment avez-vous connu Seatting-falin ?</label>
         <div> <?php echo form_dropdown('known', $options_known) ?></div>
        </div>
       
            <div class="booking_form" align="center">
              <input type="submit" name="submit" value="Contact" />
            </div>
        </div>
    <?php echo form_close(); ?>
    <?php } else {
    ?>
           <div class="error_form" align="center">Vous devez vous connecter pour nous contacter</div>
    <?php } ?>
</div>
<!--END wrapper-content-->
